package cn.zb.controller;


import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;

import cn.zb.make.Message;
import cn.zb.pojo.*;
import cn.zb.service.ForumService;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
@RequestMapping(value="/Forum")
public class ForumAction {
	@Resource
	private ForumService forumService;
	@ResponseBody
	@RequestMapping("/section")
	public  List<Section>  getTreeSection(){		
		
		return forumService.getTree();
	}
	@RequestMapping("/topic/{id}")
	public @ResponseBody List<Topic> getTopics( @PathVariable int id){		
		return forumService.getTopics(id);
	}
	

}
